package com.zttek.videoShareProject.common.json;

import com.zttek.videoShareProject.modules.model.Video;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;

/**
 * Created by ZYZ on 2018/7/10
 */
public class VideoAbuse {
    private Long abuseId;
    private String userName;
    private String reason;
    private String date;
    private String title;
    private String intro;
    private int views;
    private String videoUrl;
    private String videoType;
    private String uploadDate;
    private Long totalTime;

    public Long getVideoId() {
        return videoId;
    }

    public void setVideoId(Long videoId) {
        this.videoId = videoId;
    }

    private Long videoId;

    public String getImageUrl() {
        return imageUrl;
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }

    private String imageUrl;

    public String getBelongUser() {
        return belongUser;
    }

    public void setBelongUser(String belongUser) {
        this.belongUser = belongUser;
    }

    private String belongUser;

    public VideoAbuse(Video video){
        this.videoId=video.getVideoId();
        this.title=video.getTitle();
        this.intro=video.getIntro();
        this.views=video.getViews();
        this.videoUrl=video.getVideoUrl();
        this.videoType=video.getVideoType();
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd", Locale.getDefault());
        this.uploadDate=sdf.format(video.getUploadDate());
        this.totalTime=video.getTotalTime();
        this.imageUrl=video.getImageUrl();
    }

    public Long getAbuseId() {
        return abuseId;
    }

    public void setAbuseId(Long abuseId) {
        this.abuseId = abuseId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getReason() {
        return reason;
    }

    public void setReason(int reason) {
        switch (reason){
            case 1 : this.reason="广告";break;
            case 2 : this.reason="时政反动";break;
            case 3 : this.reason="色情低俗";break;
            case 4 : this.reason="暴力血腥";break;
            case 5 : this.reason="违法犯罪";break;
            case 6 : this.reason="标题夸张";break;
            case 7 : this.reason="文不对题";break;
            case 8 : this.reason="诈骗恶意营销";break;
            case 9 : this.reason="其他";break;

        }
    }

    public String getDate() {
        return date;
    }

    public void setDate(Date date) {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd", Locale.getDefault());
        this.date=sdf.format(date);

    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getIntro() {
        return intro;
    }

    public void setIntro(String intro) {
        this.intro = intro;
    }

    public int getViews() {
        return views;
    }

    public void setViews(int views) {
        this.views = views;
    }

    public String getVideoUrl() {
        return videoUrl;
    }

    public void setVideoUrl(String videoUrl) {
        this.videoUrl = videoUrl;
    }

    public String getVideoType() {
        return videoType;
    }

    public void setVideoType(String videoType) {
        this.videoType = videoType;
    }

    public String getUploadDate() {
        return uploadDate;
    }

    public void setUploadDate(String uploadDate) {
        this.uploadDate = uploadDate;
    }

    public Long getTotalTime() {
        return totalTime;
    }

    public void setTotalTime(Long totalTime) {
        this.totalTime = totalTime;
    }


}
